﻿
namespace sharpxbot.Core.Threading
{
    public static class ActiveHelper
    {
        public static void StartIfActive(object obj)
        {
            if (obj is IActive)
            {
                ((IActive)obj).Start();
            }
        }

        public static void StopIfActive(object obj)
        {
            if (obj is IActive)
            {
                ((IActive)obj).Stop();
            }
        }
    }
}
